<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>后台模板管理系统</title>
<link type="text/css" rel="stylesheet"
	href="${pageContext.request.contextPath}/css/style.css" />
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/menu.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/jquery-form.js"></script>

<script type="text/javascript">
	function uploadPic() {
		alert('是否有調用');
		var options = {
			url : "${pageContext.request.contextPath}/upload/uploadPic.do",
			dataType : "json",
			type : "post",
			success : function(data) {
				//回调二个路径 
				//url
				//path
				$('#allimgUrl').attr("src", data.url);
				$('#path').val(data.path);
			}
		};
		//jquery.form使用方式
		$('#jvForm').ajaxSubmit(options);
	}
</script>

<style type="text/css">
#jvForm {
	margin-top: 50px;
	padding-left: 100px;
}

#jvForm div {
	margin-bottom: 50px;
}

#jvForm input {
	width: 300px;
	border-radius: 5px;
	height: 20px;
}

#allimgUrl {
	padding-left: 66px;
}
</style>




</head>

<body>
	<div id="header">
		<div class="logo">后台管理系统</div>
		<div class="navigation">
			<ul>
				<li>欢迎您！</li>
				<li><a href="">${user.username}</a></li>
				<li><a href="">修改密码</a></li>
				<li><a href="">设置</a></li>
				<li><a href="">退出</a></li>
			</ul>
		</div>
	</div>
	<div id="content">
		<div class="left_menu">
			<ul id="nav_dot">
				<li>
					<h4 class="M1">
						<span></span>系统公告
					</h4>
					<div class="list-item none">
						<a href=''>系统公告1</a> <a href=''>系统公告2</a> <a href=''>系统公告3</a> <a
							href=''>系统公告4</a>
					</div>
				</li>
				<li>
					<h4 class="M2">
						<span></span>工单处理
					</h4>
					<div class="list-item none">
						<a href=''>工单处理1</a> <a href=''>工单处理2</a> <a href=''>工单处理3</a> <a
							href=''>工单处理4</a> <a href=''>工单处理5</a>
					</div>
				</li>
				<li>
					<h4 class="M3">
						<span></span>基础教学
					</h4>
					<div class="list-item none">
						<a href=''>基础教学1</a> <a href=''>基础教学2</a> <a href=''>基础教学3</a>
					</div>
				</li>
				<li>
					<h4 class="M4">
						<span></span>评论管理
					</h4>
					<div class="list-item none">
						<a href=''>评论管理1</a> <a href=''>评论管理2</a> <a href=''>评论管理3</a>
					</div>
				</li>
				<li>
					<h4 class="M5">
						<span></span>调研问卷
					</h4>
					<div class="list-item none">
						<a href=''>调研问卷1</a> <a href=''>调研问卷2</a> <a href=''>调研问卷3</a>
					</div>
				</li>
				<li>
					<h4 class="M6">
						<span></span>数据统计
					</h4>
					<div class="list-item none">
						<a href=''>数据统计1</a> <a href=''>数据统计2</a> <a href=''>数据统计3</a>
					</div>
				</li>
				<li>
					<h4 class="M7">
						<span></span>日常周报
					</h4>
					<div class="list-item none">
						<a href='${pageContext.request.contextPath}/reportlist.do'>报表查询</a>
						<a href=''>奖励管理2</a> <a href=''>奖励管理3</a>
					</div>
				</li>
				<li>
					<h4 class="M8">
						<span></span>商品管理
					</h4>
					<div class="list-item none">
						<a href='${pageContext.request.contextPath}/product/toadd.do'>添加商品</a>
						<a
							href='${pageContext.request.contextPath}/product/productlist.do'>商品列表</a>
					</div>
				</li>
				<li>
					<h4 class="M9">
						<span></span>品牌管理
					</h4>
					<div class="list-item none">
						<a href='${pageContext.request.contextPath}/brand/toadd.do'>添加品牌</a>
						<a href='${pageContext.request.contextPath}/brand/brandlist.do'>查询品牌</a>
					</div>
				</li>
				<li>
					<h4 class="M10">
						<span></span>系统管理
					</h4>
					<div class="list-item none" id="member_list">
						<a href=''>会员列表</a> <a href=''>新增会员 </a> <a href=''>系统管理3</a>
					</div>
				</li>
			</ul>
		</div>
		<div class="m-right">
			<div class="right-nav">
				<ul>
					<li><img
						src="${pageContext.request.contextPath}/images/home.png"></li>
					<li style="margin-left: 25px;">您当前的位置：</li>
					<li><a href="#" id="tab_one">系统公告</a></li>
					<li>></li>
					<li><a href="#" id="tab_two">最新公告</a></li>
				</ul>
			</div>

			<!-- table样式~~~~~~~~~~~~~~~~~~~~~~~~~ -->
			<div class="main">
				<form id="jvForm" enctype="multipart/form-data"
					action="${pageContext.request.contextPath}/brand/updatebrand.do?id=${brand.id}"
					method="post">
					<div>
						品牌名称：<input type="text" name="name" value="${brand.name}">
					</div>
					<div>上传图片尺寸：100*100 1M</div>
					<div>
						<img id="allimgUrl" style="width: 100px; height: 100px">&nbsp
						&nbsp &nbsp&nbsp &nbsp<input type="file" name="pic"
							onchange="uploadPic()">
					</div>
					<div>
						<!-- 隐藏域？ -->
						<input type="hidden" id="path" name="imgUrl">
					</div>
					<div>
						品牌描述：<input type="text" name="description"
							value="${brand.description}">
					</div>
					<div>
						排序：<input type="text" name="sort" value="${brand.sort}">
					</div>
					<div>
						是否可用：<input type="radio" value="1" checked="checked"
							name="isDisplay">可用 <input type="radio" value="0"
							name="isDisplay">不可用
					</div>
					<div>
						<input type="submit" value="提交"> <input type="button"
							value="重置">
					</div>
				</form>
			</div>
		</div>
	</div>
	<!-- 这里用来放过渡边界 -->
	<!-- <div class="bottom"></div>-->
	<div id="footer">
		<p>
			Copyright© 2015 版权所有 京ICP备05019125号-10 来源:<a
				href="http://www.mycodes.net/" target="_blank">源码之家</a>
		</p>
	</div>
	<script>
		navList(12);
	</script>
</body>
</html>